package me.a07impdemo7;

public class Test {
    public static void main(String[] args) {
        pingp p1 = new pingp("张三",18);
        System.out.println(p1.getName()+","+p1.getAge());
        p1.study();
        p1.speaking();
        lanq l1 = new lanq("张三",18);
        l1.study();
        ppjiao p2 = new ppjiao("张三",18);
        p2.teach();
        p2.speaking();
        lanqj l2 = new lanqj("张三",18);
        l2.teach();
    }
}
class Person{
    private String name;
    private int age;
    public Person() {
    }
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
}
class pingp extends Person implements Inter1,Inter3{
    public pingp() {
    }
    public pingp(String name, int age) {
        super(name, age);
    }
    @Override
    public void study() {
        System.out.println("学打乒乓球");
    }

    @Override
    public void speaking() {
        System.out.println("说英语");
    }
}
class lanq extends Person implements Inter1 {
    public lanq() {
    }
    public lanq(String name, int age) {
        super(name, age);
    }
    @Override
    public void study() {
        System.out.println("学打篮球");
    }
}
class ppjiao extends Person implements Inter2,Inter3{
    public ppjiao() {
    }
    public ppjiao(String name, int age) {
        super(name, age);
    }
    @Override
    public void teach() {
        System.out.println("教乒乓球");
    }

    @Override
    public void speaking() {
        System.out.println("说英语");
    }
}
class lanqj extends Person implements Inter2{
    public lanqj() {
    }
    public lanqj(String name, int age) {
        super(name, age);
    }
    @Override
    public void teach() {
        System.out.println("教篮球");
    }
}
